-- GENERATED SPELL FOR [Captain Balinda Stonehearth] --


function spell0_11949(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(46608,pUnit)
pUnit:RegisterEvent('Sorts_11949', 2000, 1)
end

function spell1_11949(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(38384,pUnit)
pUnit:RegisterEvent('Sorts_11949', 8314, 1)
end

function spell2_11949(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(46988,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11949', 2500, 1)
end

function spell3_11949(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(46987,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11949', 6500, 1)
end

function spell4_11949(pUnit, Event) --@Ice Block,Self--
pUnit:FullCastSpellOnTarget(46604,pUnit)
pUnit:RegisterEvent('Sorts_11949', 4256, 1)
end

function spell5_11949(pUnit, Event) --@Summon Water Elemental,Self--
pUnit:FullCastSpellOnTarget(45067,pUnit)
pUnit:RegisterEvent('Sorts_11949', 45301, 1)
end

function Sorts_11949(pUnit, Event)
local choix_sorts_11949 = math.random(0, 5)
if choix_sorts_11949 == 0 then
pUnit:RegisterEvent('spell0_11949', 1, 1)
end
if choix_sorts_11949 == 1 then
pUnit:RegisterEvent('spell1_11949', 1, 1)
end
if choix_sorts_11949 == 2 then
pUnit:RegisterEvent('spell2_11949', 1, 1)
end
if choix_sorts_11949 == 3 then
pUnit:RegisterEvent('spell3_11949', 1, 1)
end
if choix_sorts_11949 == 4 then
pUnit:RegisterEvent('spell4_11949', 1, 1)
end
if choix_sorts_11949 == 5 then
pUnit:RegisterEvent('spell5_11949', 1, 1)
end
end

function mob11949_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11949', math.random(1500, 3000), 1)
end

function mob11949_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11949_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11949_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11949, 1, 'mob11949_Action')
RegisterUnitEvent(11949, 2, 'mob11949_Leave')
RegisterUnitEvent(11949, 3, 'mob11949_Kill')
RegisterUnitEvent(11949, 4, 'mob11949_Die')
